<template>
  <div>
    <h1>Music的子组件</h1>
    姓名：{{ name }} 爱好：{{ hobby }}
  </div>
</template>

<script>
  export default {
    name: "Item",
    data() {
      return {
        name: "",
        hobby: "",
      };
    },
    mounted() {
      const { name, hobby } = this.$route.query;

      this.name = name;
      this.hobby = hobby;
    },
  };
</script>

<style></style>
